Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: trigger to kick player?

  1. #1

    Default trigger to kick player?

    hey can you make a under map trigger that will kick a player instead of just killing them?

  2. #2
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,259

    Default

    What under map detection do you use ?? theres a few around, like Admin Pro , Mefys mod also includes one, think even MOHAA CI has one.

    Find where it kicks the player ( might be more then 1 time , some use each map.scr because the maps are all different sizes etc, )
    And add the following

    Code:
    // Gets clientnum 
    local.clientnum = getclientnum local.player   /// <<< change to whatever the player is , most likely local.player or may be parm.other , depending on what they set.           
    //Kicks them
    stuffsrv ("clientkickr " + local.clientnum + "Going under the Map")
    /// It will also print 'Playername has been kicked for Going under the Map' , in the top left as normal

    Purple's Playground
    OBJ :
    103.29.85.127:12203
    xfire: purpleelephant1au
    email: purpleelephant1au@gmail.com
    skydrive: PurpleElephantSkydrive




  3. #3

    Default

    Use local.player or your variable and do a stufftext disconnect?
    Browse MOHAA Servers Post GameSpy Era

    VISIT MOHREBORN.COM FOR LATEST INFORMATION



    Medal of Honor: Game Server Browser Fixer - Patches your MOHAA, MOHSH, and MOHBT game binaries to allow you to retrieve a list of game servers within the multi-player menu in-game even after GameSpy ceases operation!

    Medal of Honor: Query Launcher - Find, browse, organize, join, get your ping, and get more information regarding all Medal of Honor (AA, SH, & BT) servers from your PC at any time!
    Medal of Honor: Web Server Master List - Find and browse all Medal of Honor servers online using your browser!
    Add your Medal of Honor Server to the Master List
    YouTube Video for Medal of Honor: Query Launcher and MOHAASERVERS.TK!



    MOHAA Mods and Utilities
    OwN-3m-All's Mods
    Make Me Stock - A program that allows you to easily move-in and move-out non-stock mods and other files at the click of a button. Automates adding / removing mods without having to copy / move files manually.



    Quality Game Servers

    Rent dedicated Dallas Texas, Kansas City, Las Vegas Nevada, Chicago, Pennsylvania, and Sofia Bulgaria MOHAA and other game servers from We Be HostiN starting at $10 a month.


  4. #4

    Default

    Or yeah, use Purple's method.
    Browse MOHAA Servers Post GameSpy Era

    VISIT MOHREBORN.COM FOR LATEST INFORMATION



    Medal of Honor: Game Server Browser Fixer - Patches your MOHAA, MOHSH, and MOHBT game binaries to allow you to retrieve a list of game servers within the multi-player menu in-game even after GameSpy ceases operation!

    Medal of Honor: Query Launcher - Find, browse, organize, join, get your ping, and get more information regarding all Medal of Honor (AA, SH, & BT) servers from your PC at any time!
    Medal of Honor: Web Server Master List - Find and browse all Medal of Honor servers online using your browser!
    Add your Medal of Honor Server to the Master List
    YouTube Video for Medal of Honor: Query Launcher and MOHAASERVERS.TK!



    MOHAA Mods and Utilities
    OwN-3m-All's Mods
    Make Me Stock - A program that allows you to easily move-in and move-out non-stock mods and other files at the click of a button. Automates adding / removing mods without having to copy / move files manually.



    Quality Game Servers

    Rent dedicated Dallas Texas, Kansas City, Las Vegas Nevada, Chicago, Pennsylvania, and Sofia Bulgaria MOHAA and other game servers from We Be HostiN starting at $10 a month.


  5. #5

    Default

    I use mapfix 1.3 from cheat police. mefys mod the ft thing? it has mapfixs in it?

  6. #6
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,259

    Default

    Yes mefys mod includes mapfixes along with undermap detection. Its not just for FT, includes lots of fixes to round endings,bombs etc.

    The cheat police fix i think map specific , so in order to make it kick the player, you will have to edit each map.scr.
    For example ( obj/obj_team4)
    In each map.scr you will find something like this relatively close to the top
    Code:
    /////////////////////
    // ADD DEATH BOXES //
    /////////////////////
    thread _trigSet "trig_touch" 0 "kick" -4000 -6000 0.13 3000 8000 0.14         
    thread _trigSet "trig_touch" 0 "kill" 117 2740 144 275 2740 150
    There may be more then just these 2. Anyway want you want to do is add/or change the action of what the trigger does, in this case its kill. Change it to 'kick'

    Thats half way , now we have to add what the 'kick' does, since it doesnt already have an option to kick,we will make one.
    Scoll down to the _trigAction: thread and find the switch command which has the list of commands.

    Code:
    switch ( self.ham_action )
        {
          case "hurt1":   local.player hurt 1 ; break
          case "hurt5":   local.player hurt 5 ; break
          case "hurt10":  local.player hurt 10 ; break
          case "hurt25":  local.player hurt 25 ; break
          case "hurt50":  local.player hurt 50 ; break
          case "die":      local.player hurt 10000 ; break
          case "kill":    local.player kill ; break
          case "respawn": local.player respawn ; break
          case "weapnext":local.player weapnext ; break
          case "weapdrop":local.player weapdrop ; break
          case "holster": local.player safeholster 1 ; break
          case "stand":      local.player modheight stand ; break
          case "duck":      local.player modheight duck ; break
          case "ciact":      thread outofbounds local.player ; break
          case "warn":      thread sendwarning local.player ; break
          case "kick": thread kickplayer local.player ; break
          default:      local.player stufftext self.ham_action ; break
        }
    Now we want to add another case called 'kick' leading to another thread, just like the warn and ciact cases did. So add
    case "kick": thread kickplayer local.player ; break

    Next add the following thread under the others
    Code:
    kickplayer local.player:
    
    // Gets clientnum 
    local.clientnum = getclientnum local.player         
    //Kicks them
    stuffsrv ("clientkickr " + local.clientnum + " Going under the Map")
    
    end
    That should do it, now you will have to do for EVERY map you use, in each of the corresponding script files for the maps, ie maps/dm/mohdm6.scr etc




    Or if you were to use Mefys mod, you might be already without knowing it.
    Mefys undermap detection is located at global/libmef/util.scr::under_map_thread
    And good thing about that is you only have to add something to it ONCE,
    Find the under_thread, look for
    Code:
    if (waitthread is_under_map local.player local.botz local.topz)
                    {
                        local.player takedamage
                        local.player hurt 1000
                        local.player iprint "You were killed for going under the map."
                    }
    And replace with
    Code:
    if (waitthread is_under_map local.player local.botz local.topz)
     {                  
    // Gets clientnum 
    local.clientnum = getclientnum local.player           
    //Kicks them
    stuffsrv ("clientkickr " + local.clientnum + " Going under the Map")
    
    }
    Last edited by Purple Elephant1au; October 11th, 2013 at 02:20 AM.

    Purple's Playground
    OBJ :
    103.29.85.127:12203
    xfire: purpleelephant1au
    email: purpleelephant1au@gmail.com
    skydrive: PurpleElephantSkydrive




  7. #7

    Default

    ok I'm using moh ci because frag.net gave a hard time installing reborn. so can I just add this to the mam mapfix scr.

    if ( self.ham_action == "under" )
    {
    local.player playsound dfr_M1L3_add17
    iprintlnbold "*ATTENTION* A PLAYER HAS JUST TRIED TO GO UNDER THE MAP!"
    iprintln "*ATTENTION* A PLAYER HAS JUST TRIED TO GO UNDER THE MAP!"
    wait 1
    local.player stufftext "say I JUST TRIED TO GO UNDER THE MAP!"
    wait .1

    // Gets clientnum
    local.clientnum = getclientnum local.player
    //Kicks them
    stuffsrv ("clientkickr " + local.clientnum + " Going under the Map")

    }

  8. #8

    Default

    never mind it don't work...lol

  9. #9
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,259

    Default

    Oh no reborn ..
    Then you will just have to stufftext disconnect instead of trying to kick them.

    local.player stufftext "disconnect;"

    Purple's Playground
    OBJ :
    103.29.85.127:12203
    xfire: purpleelephant1au
    email: purpleelephant1au@gmail.com
    skydrive: PurpleElephantSkydrive




  10. #10

    Default

    hee hee I got it...lol I installed the mefy's thing and did this

    if (waitthread is_under_map local.player local.botz local.topz)
    {
    local.player stufftext "disconnect;"
    //local.player hurt 1000
    //local.player iprint "You were killed for going under the map."
    }

    works great Thanks a lot....learn new crap everyday.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •